<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- public quote -->
<%@include file="/jsp/comm_css_include.jsp"%>
<link rel="stylesheet" type="text/css" href="${basePath}/css/zTreeStyle/zTreeStyle/zTreeStyle.css">
<!doctype html>
<html>
<head>
<style type="text/css">
li{list-style: none;}

</style>
</head>
<body class="gray-bg">
	<input type="hidden" id="editId"/>
	<div class="container creditbody">
		<div class="iboxtitle">
		 	<span><i class="glyphicon glyphicon-map-marker"></i>&nbsp;风控条件修改审核</span>
        </div>
	    <%@include file="/jsp/comm_yw_info_include.jsp"%>
        <div class="business-manwife">项目详情</div>
		<div class="tche-padding">
			<table cellpadding="0" cellspacing="0" border="0" class="thead-tabletz">
				<thead class="thead-a">
					<tr>
						<th>项目</th>
						<th>原值</th>
						<th>新值</th>
					</tr>
				</thead>
				<tbody class="tbody-a">
					<tr>
						<td colspan="3" align="center"><strong class="strongFont">项目详情</strong></h1>
					</tr>
					<tr>
						<td id="">加装GPS</td>
						<td id="addGpsOld"></td>
						<td id="addGpsNew"></td>
					</tr>
					<tr>
						<td id="">征信押金</td>
						<td id="addGepositOld"></td>
						<td id="addGepositNew"></td>
					</tr>
					<tr>
						<td id="">收费变通</td>
						<td id="flexibleChargeOld"></td>
						<td id="flexibleChargeNew"></td>
					</tr>
					<tr>
						<td id="">延迟垫款</td>
						<td id="isSpecialOrderOld"></td>
						<td id="isSpecialOrderNew"></td>
					</tr>
					<tr>
						<td colspan="3" align="center"><strong class="strongFont">备注</strong></h1>
					</tr>
					<tr>
						<td colspan="3" id="remarks"></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="business-manwife">审核信息</div>
		<div class="business-padding">
			<table cellpadding="0" cellspacing="0" border="0" class="thead-tabletz">
					<thead class="thead-a">
						<tr>
							<th>业务流程</th>
							<th>经办部门</th>
							<th>经办人</th>
							<th>处理时间</th>
						</tr>
					</thead>
					<tbody class="tbody-a" id="tbody-a"></tbody>	
			</table>
		</div>
   		<!-- 当前经办人 -->
   		<div class="business-manwife">经办信息</div>
		<div class="padding-nono">
			<table cellpadding="0" cellspacing="0" border="0"
				class="buyinfor-table">
				<tr>
					<td align="right"><label class="control-label np">经办人：</label>
					</td>
					<td><input class="form-control" type="text" id="operate" name="" readonly="readonly" value="${current_user_key.uname}" />
					</td>
					<td align="right"><label class="control-label np">经办时间：</label>
					</td>
					<td><input id="operateTime" name="operateTime" class="form-control"  placeholder="经办时间" readonly="readonly"/></td>
				</tr>
			</table>
		</div>
	</div>
	
	<!-- public quote -->
    <%@include file="/jsp/comm_js_include.jsp"%>
    <script type="text/javascript" src="${basePath}/js/plugins/layer/laydate/laydate.js"></script>
    <!--
    	时间：2017-04-06
    	描述：js
    -->
    <script type="text/javascript">
    jQuery(function($) {  
    	getData();
    	geData();
    	geShData();
    });
	
    var getData=function(){
    	var data={};
	 		data.busiId=$.getUrlData("busiId");
	 		data.type_extras='Audit';
	 		$.dpAjax({
 			  show:false,
    		  url:'${basePath}/FkAuditConditionEditSubController/list',
	          data: data,
	          success: function (datas) {
	        	  var result = datas.result.rows;
	        	  if(result && result !=""){
		        	  $("#editId").val(result[0].editId);
		        	  for(var i in result){
		        		  var codeExtras = result[i].codeExtras;
		        		  var valueExtrasOld = result[i].valueExtrasOld;
		        		  var valueExtrasNew = result[i].valueExtrasNew;
		        		  if(codeExtras == "AddGps"){
		        			  $("#addGpsNew").text((valueExtrasNew && valueExtrasNew !="null") ? parseInt(valueExtrasNew) : '0');
		        		  }else if(codeExtras == "IsSpecialOrder"){
		        			  $("#isSpecialOrderNew").text(valueExtrasNew == "1" ? "是" : "否");
		        		  }else if(codeExtras == "FlexibleCharge"){
		        			  $("#flexibleChargeNew").text((valueExtrasNew && valueExtrasNew !="null") ? valueExtrasNew : '0');
		        		  }else if(codeExtras == "AddGeposit"){
		        			  $("#addGepositNew").text((valueExtrasNew && valueExtrasNew !="null") ? valueExtrasNew : '0');
		        		  }
		        		  $("#remarks").text(result[i].remarks);
		        		  $("#operateTime").val(formateIntegerDate(result[i].created));
		        	  }
	        	  }
	          }
	      });
    }
    
    var geData = function(){
    	var data={};
 		data.busiId=$.getUrlData("busiId");
 		data.type_extras='Audit';
    	$.dpAjax({
    		  show:false,
    		  url:'${basePath}/YwBusinessExtrasController/list',
	          data: data,
	          success: function (datas) {
	        	  var result = datas.result.rows;
	        	  if(result && result !=""){
		        	  for(var i in result){
		        		  var codeExtras = result[i].codeExtras;
		        		  var valueExtrasOld = result[i].valueExtras;
		        		  if(codeExtras == "AddGps"){
		        			  $("#addGpsOld").text((valueExtrasOld && valueExtrasOld !="null") ? parseInt(valueExtrasOld) : '0');
		        		  }else if(codeExtras == "FlexibleCharge"){
		        			  $("#flexibleChargeOld").text((valueExtrasOld && valueExtrasOld !="null") ? valueExtrasOld : '0');
		        		  }else if(codeExtras == "AddGeposit"){
		        			  $("#addGepositOld").text((valueExtrasOld && valueExtrasOld !="null") ? valueExtrasOld : '0');
		        		  }else if(codeExtras == "IsSpecialOrder"){
	        				  $("#isSpecialOrderOld").text(valueExtrasOld == "1" ? "是" : "否");
	        			  }
		        	  }
	        	  }
	          }
	      });
    }
	
    var geShData = function(){
    	var data={};
 		data.busiId=$.getUrlData("busiId");
 		data.modeId="M_fktjxgsh";
    	$.dpAjax({
    		  url:'${basePath}/OtherAuditInfoController/list',
	          data: data,
	          success: function (datas) {
	        	 var result = datas.result.rows;
	        	 var html = '';
	        	 if(result && result !=""){
		        	 for(var i in result){
		        		var auditName = result[i].auditName;
		        		var orgName = result[i].orgName;
		        		var creatorName = result[i].creatorName;
		        		var created = result[i].created;
		        		var auditStatusDisplay = result[i].auditStatusDisplay;
		        		html +='<tr><td>'+auditName+'</td><td>'+orgName+'</td><td>'+creatorName+'</td><td>'+auditStatusDisplay+'</td></tr>';
		        	 }
		        	 $("#tbody-a").html(html);
	        	 }else{
		        	html +='<tr><td>-</td><td>-</td><td>-</td><td>-</td></tr>';
		        	$("#tbody-a").html(html);
	        	 }
	          }
	      });
    }
		
    </script>
</body>
</html>
